all: dvi pdf ps

pdf: cv.pdf
dvi: cv.dvi
mpost: metapost-example-1.mps
ps: cv.ps
ps2: cv-2.ps
ps4: cv-4.ps
jpeg2ps: foto-jpeg2ps.ps

clean:
	-rm cv.{aux,pdf,ps,dvi,log,bbl,blg,idx,ilg,ind,out,bak}
	-rm metapost-example{-1.mps,.log}

cv.pdf: cv.dvi
	pdflatex cv.tex
	
cv.dvi: cv.tex metapost-example-1.mps
	latex cv
	latex cv
	bibtex cv
	latex cv
	latex cv
	csindex -d -h -k -z il2 cv	
	latex cv
	latex cv

metapost-example-1.mps: metapost-example.mp
	mpost -translate-file=il2-t1 metapost-example.mp

cv.ps: cv.pdf
	pdftops cv.pdf
	
cv-4.ps: cv.ps
	psnup -4 cv.ps cv-4.ps
	
cv-2.ps: cv.ps
	psnup -2 cv.ps cv-2.ps
	
foto-jpeg2ps.ps: foto.jpeg
	jpeg2ps foto.jpeg		
